import viewbuilder.HtmlBuilder

def writer = new StringWriter()
def builder = new HtmlBuilder(writer)


builder.html {
    head {
        title("My Title")
    }
    body(id:'foo') {
        text("Some first text")
        br()
        text("Some second text")
        ul {
            li("item1")
            li("item2")
        }
    }
    br()
    div("A value") {
        p("Tricky")
    }
}

println writer.toString()